#pragma once

class hgeVector;

class Vector : public hgeVector
{
public:
	Vector(hgeVector v) : hgeVector(v.x, v.y){}
	Vector(float x = 0, float y = 0) : hgeVector(x, y){}
	inline float LengthSquared() { return Dot(this); }
	inline float AngleBetween(hgeVector & v)
	{
		float Angle(atan2(y, x) - atan2(v.y, v.x));
		if(_isnan(Angle) != 0) return 0;
		if(Angle < 0) Angle += 2.0f * PI;
		return Angle;
	}
	inline hgeVector Rotate(float Radians, hgeVector & Point)
	{
		hgeVector nv = hgeVector(*this - Point);
		return hgeVector(	nv.y * sin(Radians) + nv.x * cos(Radians), 
							nv.y * cos(Radians) - nv.x * sin(Radians));
	}
};

typedef Vector Vector2D, Vector2;